<script lang="ts">
import { defineComponent, ref } from 'vue'

export default defineComponent({

  methods: {
    onButtonClick() {
      this.count++
    }
  },
  setup() {
    const count = ref(0)

    return {
      count
    }
  }
})
</script>

<template>
  <div class="view-index">
    这是首页<button @click="onButtonClick">{{ count }}</button>
  </div>
</template>

<style scoped lang="less">
.view-index {
  
  padding: 24px;
}
</style>
